// Just a simple test

// THIS IS NOT AN OFFICAL API. I'm not affiliated with Google in any way.

// If you don't know whats going on check out http://code.google.com/p/steam-chat-relay/

#include <stdio.h>
#include <iostream>

#include "GoogleVoice.h"

using namespace std;

int main(int argc, const char* argv[])
{
	GoogleVoice *gVoice = new GoogleVoice("spacetech326@gmail.com", "");

	bool loggedIn = gVoice->Login();
	printf("Login: %s\n", gVoice->Login() ? "success" : "fail");

	//printf("SendSMS: %s", gVoice->SendSMS("5555555555", "testing") ? "success" : "fail");

	while(loggedIn)
	{
		sms_vector sms_messages = gVoice->GetNewSMS();

		for(unsigned int i=0; i < sms_messages.size(); i++)
		{
			sms_data data = sms_messages[i];
			cout << data.phoneNumber << " | " << data.message << endl;
			//gVoice->DeleteSMS(data.id);
			//gVoice->MarkSMSRead(data.id);
		}

		Sleep(3000);
	}

	return 0;
}
